package icasue.tools.sqlhelper.adaptor.ibatis.mapper;

import icasue.tools.sqlhelper.adaptor.annotation.AutoProvider;
import icasue.tools.sqlhelper.common.FieldsTouch;
import icasue.tools.sqlhelper.core.Consult;

import java.util.List;

/**
 * @Author: Qiao Hang
 * @CreateDate: 2021/11/19 上午10:22
 * @UpdateDate:
 * @Description:
 */
public interface FieldRows<JavaType> {

    @AutoProvider(method = "fieldRow")
    <R> R fieldRow(FieldsTouch<JavaType,R> fieldsTouches);

    @AutoProvider(method = "fieldRows")
    <R> List<R> fieldRows(FieldsTouch<JavaType,R> fieldsTouches);

    @AutoProvider(method = "fieldRowSmart")
    <R> R fieldRowSmart(JavaType inst, FieldsTouch<JavaType,R> fieldsTouches);

    @AutoProvider(method = "fieldRowsSmart")
    <R> List<R> fieldRowsSmart(JavaType inst, FieldsTouch<JavaType,R> fieldsTouches);

    @AutoProvider(method = "fieldRowByConsult")
    <R> R fieldRowByConsult(Consult<JavaType> consult, FieldsTouch<JavaType,R> fieldsTouches);

    @AutoProvider(method = "fieldRowsByConsult")
    <R> List<R> fieldRowsByConsult(Consult<JavaType> consult, FieldsTouch<JavaType,R> fieldsTouches);
}
